<%--
  Created by IntelliJ IDEA.
  User: 11200
  Date: 2019/8/23
  Time: 上午 11:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<table class="table table-hover ms-table">
  <thead>
  <tr>
    <th>类型</th>
    <th>姓名</th>
    <th>手机号</th>
    <th>出发日期</th>
    <th>出发城市</th>
    <th>成人数量</th>
    <th>儿童数量</th>
    <th>状态</th>
    <th>特殊需求</th>
    <th class="text-center">操作</th>
  </tr>
  </thead>
  <tbody>

  <c:if test="${not empty enquiries}">
    <c:forEach items="${enquiries}" var="e">
      <tr>
        <td>${e.type.description}</td>
        <td>${e.customerName += e.customerPerfix}</td>
        <td>${e.customerMobile}</td>
        <td><fmt:formatDate value="${e.departureTime}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate></td>
        <td>${e.departureCity}</td>
        <td>${e.audltNumber}</td>
        <td>${e.childNumber}</td>
        <td>${e.orderCreated ? '已创建过订单' : '未创建过订单'}</td>
        <td>${e.specialRequirement}</td>
        <td><a href="${ctx.host}/enquiries/${e.id}/create-reverse-order" data-toggle="modal" data-target="#create-reverse-order">创建订单</a></td>
      </tr>
    </c:forEach>
  </c:if>

  </tbody>
  <tfoot>
  <tr>
    <td colspan="10" class="no-vertical-padding">
      <div class="pull-left">
        <jsp:include page="/WEB-INF/include/page.jsp">
          <jsp:param name="url" value="${ctx.host}/enquiries"/>
          <jsp:param name="queryString" value="${queryString}"/>
        </jsp:include>
      </div>
    </td>
  </tr>
  </tfoot>
</table>
